com.highdeal.admin.hci
Class StatusModel

java.lang.Object
  extended by com.highdeal.admin.hci.StatusModel
All Implemented Interfaces:
XMLMarshallable

public class StatusModel
extends java.lang.Object
implements XMLMarshallable

This Java class represents the status of an instance in the SAP CC system.

See Also:
GetStatusOp

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="status">
  <xs:complexType>
    <xs:attribute name="isRunning" type="xs:boolean" use="required"/>
    <xs:attribute name="startDate" type="xs:dateTime"/>
    <xs:attribute name="currentDate" type="xs:dateTime"/>
    <xs:attribute name="freeMemory" type="xs:decimal" use="required"/>
    <xs:attribute name="totalMemory" type="xs:decimal" use="required"/>
  </xs:complexType>
</xs:element>


Field Summary
static java.lang.String CURRENTDATE
          XML Mapping for the start date: "startDate"
static java.lang.String FREE_MEMORY
          XML Mapping for the free memory: "freeMemory"
static java.lang.String ISRUNNING
          XML Mapping for the running flag: "isRunning"
static java.lang.String STARTDATE
          XML Mapping for the start date: "startDate"
static java.lang.String STATUS_MODEL
          XML Mapping for the status model: "status"
static java.lang.String TOTAL_MEMORY
          XML Mapping for the total memory: "totalMemory"
 
Constructor Summary
StatusModel()
           
StatusModel(boolean isRunning, java.util.Date startDate, java.util.Date currentDate, long totalMemory, long freeMemory)
          Initializes a new StatusModel instance with the running status and the start date of the instance of the SAP CC system
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds string data to this model.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child tag to this model.
 java.util.Date getCurrentDate()
          Gets the current date of this instance of the SAP CC system.
 long getFreeMemory()
          Gets an estimation of the JVM free memory of the instance of the SAP CC system.
 java.util.Date getStartDate()
          Gets the date at which the instance of the SAP CC system has been started.
 long getTotalMemory()
          Gets the total memory used by the JVM of the instance of the SAP CC system.
 boolean isRunning()
          Returns true if the instance of SAP CC system is running.
 void marshal(XMLOutputter output)
          Writes the operation XML data to the given output.
 void setAttributes(XMLAttributes atts)
          Sets the operation attributes from the XMLAttributes.
 void setCurrentDate(java.util.Date currentDate)
          Sets the current date of this instance of the SAP CC system.
 void setFreeMemory(long freeMemory)
          Sets an estimation of the JVM free memory of the instance of the SAP CC system.
 void setIsRunning(boolean isRunning)
          Sets the running status of the system instance.
 void setStartDate(java.util.Date startDate)
          Sets the date at which the instance of the SAP CC system has been started
 void setTotalMemory(long totalMemory)
          Sets the total memory of the instance of the SAP CC system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_MODEL

public static final java.lang.String STATUS_MODEL
XML Mapping for the status model: "status"

See Also:
Constant Field Values

ISRUNNING

public static final java.lang.String ISRUNNING
XML Mapping for the running flag: "isRunning"

See Also:
Constant Field Values

STARTDATE

public static final java.lang.String STARTDATE
XML Mapping for the start date: "startDate"

See Also:
Constant Field Values

CURRENTDATE

public static final java.lang.String CURRENTDATE
XML Mapping for the start date: "startDate"

See Also:
Constant Field Values

TOTAL_MEMORY

public static final java.lang.String TOTAL_MEMORY
XML Mapping for the total memory: "totalMemory"

See Also:
Constant Field Values

FREE_MEMORY

public static final java.lang.String FREE_MEMORY
XML Mapping for the free memory: "freeMemory"

See Also:
Constant Field Values
Constructor Detail

StatusModel

public StatusModel()

StatusModel

public StatusModel(boolean isRunning,
                   java.util.Date startDate,
                   java.util.Date currentDate,
                   long totalMemory,
                   long freeMemory)
Initializes a new StatusModel instance with the running status and the start date of the instance of the SAP CC system

Parameters:
isRunning - Flag indicating if the server is running
startDate - The date when the server was started
currentDate - The current date of the server
totalMemory - The total available memory in the JVM
freeMemory - The free available memory in the JVM
See Also:
Runtime.freeMemory(), Runtime.totalMemory()
Method Detail

getStartDate

public java.util.Date getStartDate()
Gets the date at which the instance of the SAP CC system has been started.

Returns:
The instance start date if the instance is started; null otherwise

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the date at which the instance of the SAP CC system has been started

Parameters:
startDate - The start date

getCurrentDate

public java.util.Date getCurrentDate()
Gets the current date of this instance of the SAP CC system.

Returns:
The current instance date

setCurrentDate

public void setCurrentDate(java.util.Date currentDate)
Sets the current date of this instance of the SAP CC system.

Parameters:
currentDate - The current instance date

isRunning

public boolean isRunning()
Returns true if the instance of SAP CC system is running.

Returns:
true if the system instance is running, false otherwize.

setIsRunning

public void setIsRunning(boolean isRunning)
Sets the running status of the system instance.

Parameters:
isRunning - The running status

getFreeMemory

public long getFreeMemory()
Gets an estimation of the JVM free memory of the instance of the SAP CC system.

Returns:
The free memory of the JVM

setFreeMemory

public void setFreeMemory(long freeMemory)
Sets an estimation of the JVM free memory of the instance of the SAP CC system.

Parameters:
freeMemory - The free memory of the JVM

getTotalMemory

public long getTotalMemory()
Gets the total memory used by the JVM of the instance of the SAP CC system.

Returns:
The total memory of the JVM

setTotalMemory

public void setTotalMemory(long totalMemory)
Sets the total memory of the instance of the SAP CC system.

Parameters:
totalMemory - The total memory of the JVM

setAttributes

public void setAttributes(XMLAttributes atts)
Sets the operation attributes from the XMLAttributes.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XMLAttributes containing the data

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Adds a child tag to this model.

This tag is ignored for this model.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of the tag
child - The XMLMarshallable child to add

addCharacterData

public void addCharacterData(java.lang.String cData)
Adds string data to this model.

This data is ignored for this model.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to add to the operation

marshal

public void marshal(XMLOutputter output)
Writes the operation XML data to the given output.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XMLOutputter to write into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)